-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only consider personal details with logins set in OptionsListUtils.getOptions
#21159
Conversation
// We're only picking personal details that have logins set | ||
// This is a temporary fix for all the logic that's been breaking because of the new privacy changes | ||
// See https://github.com/Expensify/Expensify/issues/293465 for more context | ||
// eslint-disable-next-line no-param-reassign | ||
personalDetails = _.pick(personalDetails, (detail) => Boolean(detail.login)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the effects of excluding personal details from this object? They don't appear in the option list?
Do you know where this was causing problems down the line? I imagine we where trying to use personalDetails.login
which was missing, but in other fixes we have been adding personalDetails.login || personalDetails.displayName
... just wondering why that approach was not good here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because Tasks takes the login from the option and does a lot more stuff with it, so we can't just do that
Also, it's not guaranteed that personalDetails.displayName is equal to their login. If they have a display name set already then it won't be equal. That only applies to new users that haven't set their personal details yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume that we actually needed the login (emails) for the flows that broke downstream, so using the displayName
might not be enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That only applies to new users
Then it can be that the personalDetails.login
is missing for users that are not new? I mean, can it happen that personalDetails.login
is missing and personalDetails.displayName
is missing?
In the cases I have seen so far, when the login
is missing, the displayName
is the email address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the cases I have seen so far, when the login is missing, the displayName is the email address.
Is this still true if the user sets their display name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's definitely possible - maybe you can check with Puneet's updated query here? https://github.com/Expensify/Auth/pull/8153
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, this Auth fix works for 1:1 DM's
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's intended to also work for group DMs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now to the last part of the issue, where if I have DM some random new users and send some messages. The chat appears in LHN. Again, when I go to chat switcher and type full email, and click on option, it creates a new report with same user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reported here, in case it is already known
Unassigning C+ for urgency as this is a fire |
Reviewer Checklist
Screenshots/VideosWebweb.movMobile Web - Chromechrome.movMobile Web - Safarisafari.movDesktopdesktop.moviOSios.movAndroidandroid.mov |
|
…WithoutLogins Only consider personal details with logins set in `OptionsListUtils.getOptions` (cherry picked from commit b7069ec)
…-21159 🍒 Cherry pick PR #21159 to staging 🍒
🚀 Cherry-picked to staging by https://github.com/luacmartins in version: 1.3.29-11 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/luacmartins in version: 1.3.29-11 🚀
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 1.3.32-1 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 1.3.32-5 🚀
|
// We're only picking personal details that have logins set | ||
// This is a temporary fix for all the logic that's been breaking because of the new privacy changes | ||
// See https://github.com/Expensify/Expensify/issues/293465 for more context | ||
// eslint-disable-next-line no-param-reassign |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any follow up issues to address the temp fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, we just recently merged the PR that handles when you try to chat with someone whose login you don't have in Onyx, so we should be able to undo this now. I'll create an issue for a contributor to do it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or maybe actually I can just revert this.
// This is a temporary fix for all the logic that's been breaking because of the new privacy changes | ||
// See https://github.com/Expensify/Expensify/issues/293465 for more context | ||
// eslint-disable-next-line no-param-reassign | ||
personalDetails = _.pick(personalDetails, (detail) => Boolean(detail.login)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, we should have placed this code just before creating an option
It would have prevented bug - Tooltip content only have comma in content when hovering group chat with non-register users
More details - #22593 (comment)
Details
Fixed Issues
$ https://github.com/Expensify/Expensify/issues/293465
$ #21040
$ https://github.com/Expensify/Expensify/issues/293416
Tests
Group DMs
Tasks
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android